 
<%@page import="entities.Message"%>
<%@page import="dao.MemberDao"%>
<%@page import="dao.MemberDao"%>
<%@page import="java.util.Iterator"%>
<%@page import="dao.MessageDao"%>
<%@page import="dao.MessageDao"%>
<%@page import="dao.AdminDao"%>
<%
    AdminDao adminDao = new AdminDao();
    MessageDao messageDao = new MessageDao();
    MemberDao memberDao = new MemberDao();
    for (Iterator it = messageDao.getMessage().iterator(); it.hasNext();) {
        Message message = (Message) it.next();
        String username = memberDao.getUsernameByID(
                adminDao.getMemberidByAdminId(message.getAdminid()));
        String msg = message.getMessage();
        session.setAttribute("Admin", username);
        session.setAttribute("Message", msg);
    }%>